<?php /*a:1:{s:39:"theme/index/default/user/agent_reg.html";i:1554211710;}*/ ?>
<!doctype html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no" />
	<meta content="yes" name="apple-mobile-web-app-capable" />
	<meta content="black" name="apple-mobile-web-app-status-bar-style" />
	<meta content="telephone=no" name="format-detection" />
	<meta name="description" />
	<link rel="icon" href="/favicon.ico" type="image/x-icon" />
	<title>经销商分润管理系统</title> 

   	<link href="/theme/index/default/static/css/mui.min.css" rel="stylesheet"> 
    <link href="/theme/index/default/static/css/alertify.core.css" rel="stylesheet" type="text/css">
    <link href="/theme/index/default/static/css/alertify.default.css" rel="stylesheet" type="text/css">
    <link href="/theme/index/default/static/css/font-awesome.min.css" rel="stylesheet" /> 
	<link href="/theme/index/default/static/css/default.manager.css" rel="stylesheet" type="text/css" />
 	<link href="/theme/index/default/static/css/app.css" rel="stylesheet"/> 
    <link href="/theme/index/default/static/css/SkinConfig-Black.css" rel="stylesheet"  type="text/css"/> 
    <link href="/theme/index/default/static/css/user.css" rel="stylesheet"> 
    
    <script type="text/javascript" src="/theme/index/default/static/js/jquery.2.1.4.min.js"></script>
   	<script type="text/javascript" src="/theme/index/default/static/js/mtcache/mt.cache.js"></script>
   	<script type="text/javascript" src="/theme/index/default/static/js/vue.min.js"></script>   
    <script type="text/javascript" src="/theme/index/default/static/js/lib/alertify.js"></script> 
	<script type="text/javascript" src="/theme/index/default/static/js/lib/jquery.qrcode.min.js"></script>  
    <script type="text/javascript" src="/theme/index/default/static/js/lib/exif.js"></script> 
    <script type="text/javascript" src="/theme/index/default/static/js/lib/mobileFix.mini.js"></script> 
    <script type="text/javascript" src="/theme/index/default/static/js/mt.compress-1.1.js"></script> 
    <script type="text/javascript" src="/theme/index/default/static/js/mui.min.js"></script>
    <script type="text/javascript" src="/theme/index/default/static/js/LUploader.js?v=1.0.0"></script>
	<style type="text/css">
	.mui-input-group input{
		height: 40px; 
	}
	.zpsc{
		text-align: center; 
	}
	.zpsc img{
		width: 5rem;
    	margin-top: 0.3rem; 
	}
	.zpsc h3{
		text-align: center;
    	font-size: 14px;
    	font-weight: normal;
    	margin-top:0;
    	margin-bottom:0.5rem;
	}
	.zpsc .mui-col-sm-6{
		width:50%;
	}
	.mui-input-group .mui-input-row:after{
		left: 0;
	}
	.icon-camera{background-image:url("/theme/index/default/static/images/paizhao.png");background-size:100%}
	.LUploader{
		margin:20px 15px 15px 15px;
		padding: 5px;
	    text-align: center;  
	    background: #ffffff;
	    height: 100px;
	    position: relative;
	    width: 50%;
	    float: left;
	    box-sizing: border-box;
	    margin: 0;
	}
	.LUploader input[data-LUploader]{display:none}
	.LUploader .icon{font-size:20px;margin:1.5rem auto 5px auto;width:1em;height:1em;display:block}
	.LUploader p{padding:0 0 20px 0;font-size:13px;color:#afb1b4}
	.LUploader .LUploader-container{height:100%}
	.LUploader .LUploader-container+div{position:absolute;top:0;left:0;width:100%;height:100%}
	.LUploader .LUploader-list{
		height:100%;    
		padding: 0;
    	margin: 0;
    }.LUploader .LUploader-list li{position:relative;display:inline-block;width:100%;height:100%;background:#fff no-repeat center;background-size:cover}.LUploader .LUploader-progress{position:absolute;width:100%;height:20px;line-height:20px;bottom:0;left:0;background-color:rgba(100,149,198,0.5)}.LUploader .LUploader-progress span{display:block;width:0;height:100%;background-color:#6495c6;text-align:center;color:#FFF;font-size:13px}.LUploader .LUploader-size{position:absolute;width:100%;height:15px;line-height:15px;bottom:-18px;text-align:center;font-size:13px;color:#666}
	 
	.mui-input-group:after{
		content:none;
	}
	</style>
 	<script>
		var ajaxCacheTime = 30; 
 	</script>
</head>
<body id="app" class="mui-android mui-android-6 mui-android-6-0 mui-fullscreen" style="text-size-adjust: 100%;">
	<header class="mui-bar mui-bar-nav ">
        <span class="mui-icon mui-icon-back mui-pull-left"></span>
        <h1 class="mui-title title">代理授权</h1> 
    </header>
    <?php if($djsss < 0): ?>
    <div class="mui-content">  
  		<p style="text-align:center;margin-top:30px;">链接已失效，请重新分享</p>
  	</div>
    <?php else: ?>
    <nav class="mui-bar mui-bar-tab" style="background:#BF2D92;">
		 <p style="text-align:center;line-height:2.75rem;margin:0;" id="ljzc">立即注册（<span id="p1">888</span>s）</p>
	</nav>
	<div class="mui-content" style="margin-bottom:3rem;">   
		<form class="mui-input-group" id="reg_form" action="<?php echo url(); ?>" method="post">
			<div class="mui-input-row" style="height:5rem;">
		        <label style="height:5rem;width:30%;"><img src="<?php echo htmlentities($fjdl_info['ysz']); ?>" style="width:4rem;height:4rem;border-radius:50%;"/></label>
		    	<div style="float:left;width:70%;">
		    		<h3 style="font-size:14px;margin-top:1rem;">邀请人：<?php echo htmlentities($fjdl_info['dlname']); ?>（授权号：<?php echo htmlentities($fjdl_info['sqh']); ?>）</h3>
		    		<p>邀请你加入<?php if($fjdl_info['sex'] == 1): ?>他<?php else: ?>她<?php endif; ?>的团队</p>
		    	</div>
		    </div>
		    <div class="mui-input-row">
		        <label>当前级别</label>
		        <label style="padding-left:0;"><?php echo htmlentities($dldj_info['levelname']); ?></label> 
		        <input type="hidden" name="levelname" value="<?php echo htmlentities($dldj_info['levelname']); ?>" > 
		        <input type="hidden" name="pid" value="<?php echo htmlentities($fjdl_info['id']); ?>" > 
		    </div>
		    <div class="mui-input-row">
		        <label>金额</label>
		        <label style="padding-left:0;"><?php echo htmlentities(number_format($dldj_info['czje'],'2')); ?>元</label>
		        <input type="hidden" name="lddj_id" value="<?php echo htmlentities($dldj_info['id']); ?>" > 
		        <input type="hidden" name="scje" value="<?php echo htmlentities($dldj_info['czje']); ?>" >
		    </div>
		    <div class="mui-input-row">
		        <label>姓名</label>
		        <input type="text" name="dlname" class="mui-input-clear" placeholder="姓名">
		    </div> 
		    <div class="mui-input-row">
		        <label>微信</label>
		        <input type="text" name="dl_weixin" class="mui-input-clear" placeholder="微信">
		    </div>
		    <div class="mui-input-row">
		        <label>手机号</label>
		        <input type="text" name="dl_phone" class="mui-input-clear" placeholder="手机号">
		    </div> 
		    <div class="mui-input-row">
		        <label>身份证</label>
		        <input type="text" name="sfzh" class="mui-input-clear" placeholder="身份证">
		    </div> 
		    <div class="mui-input-row">
		        <label>授权省份</label>
		        <select class="mui-input-clear" name="province" id="province">
		        	<option value="0">省份</option>
		        	<?php if(is_array($province) || $province instanceof \think\Collection || $province instanceof \think\Paginator): $i = 0; $__LIST__ = $province;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?>
		        		<option value="<?php echo htmlentities($v['code']); ?>"><?php echo htmlentities($v['name']); ?></option>
		        	<?php endforeach; endif; else: echo "" ;endif; ?>
		        </select> 
		    </div> 
		    <div class="mui-input-row">
		        <label>授权城市</label>
		        <select class="mui-input-clear" name="city" id="city">
		        	<option value="0">城市</option>
		        	<?php if(is_array($city) || $city instanceof \think\Collection || $city instanceof \think\Paginator): $i = 0; $__LIST__ = $city;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?>
		        		<option value="<?php echo htmlentities($v['code']); ?>"><?php echo htmlentities($v['name']); ?></option>
		        	<?php endforeach; endif; else: echo "" ;endif; ?>
		        </select> 
		    </div> 
		    <div class="mui-input-row">
		        <label>授权地区</label>
		        <select class="mui-input-clear" name="area" id="area">
		        	<option value="0">地区</option>
		        	<?php if(is_array($area) || $area instanceof \think\Collection || $area instanceof \think\Paginator): $i = 0; $__LIST__ = $area;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?>
		        		<option value="<?php echo htmlentities($v['code']); ?>"><?php echo htmlentities($v['name']); ?></option>
		        	<?php endforeach; endif; else: echo "" ;endif; ?>
		        </select> 
		    </div> 
		    <div class="mui-input-row">
		        <label>收货地址</label>
		        <input type="text" name="shdz" class="mui-input-clear" placeholder="收货地址">
		    </div> 
		    <div class="mui-input-row">
		        <label>行业</label>
		        <input type="text" name="qianzy" class="mui-input-clear" placeholder="行业">
		    </div> 
		    <div class="mui-input-row">
		        <label>性别</label> 
		        <span class="mui-radio" style="float:left;width: 65px;">男<input name="sex" value="1" type="radio"></span>
				<span class="mui-radio" style="float:left;width: 65px;">女<input name="sex" value="2" type="radio"></span> 
			</div> 
		    <div class="mui-input-row">
		        <label>婚姻状况</label>
		        <span class="mui-radio" style="float:left;width: 80px;">已婚<input name="hyzk" value="1" type="radio"></span>
				<span class="mui-radio" style="float:left;width: 80px;">未婚<input name="hyzk" value="0" type="radio"></span>
		    </div>
		    <div class="mui-row zpsc">
			    <div class="LUploader" id="demo1" style="border-right:1px solid #e4e3e6;border-bottom:1px solid #e4e3e6;">
			        <div class="LUploader-container">
			            <input data-LUploader='demo1' data-form-file='basestr' data-upload-type='sfzzm' type="file" />
			            <input type="hidden" name="sfzzm" id="sfzzm" value="" />
			            <ul class="LUploader-list"></ul>
			        </div>
			        <div>
			            <div class="icon icon-camera font20"></div>
			            <p>上传身份证正面照</p>
			        </div>
			    </div>
			    <div class="LUploader" id="demo2" style="border-bottom:1px solid #e4e3e6;">
			        <div class="LUploader-container">
			            <input data-LUploader='demo2' data-form-file='basestr' data-upload-type='sfzfm' type="file" />
			            <input type="hidden" name="sfzfm" id="sfzfm" value="" />
			            <ul class="LUploader-list"></ul>
			        </div>
			        <div>
			            <div class="icon icon-camera font20"></div>
			            <p>上传身份证反面照</p>
			        </div>
			    </div>
			    <div class="LUploader" id="demo3" style="border-right:1px solid #e4e3e6;border-bottom:1px solid #e4e3e6;">
			        <div class="LUploader-container">
			            <input data-LUploader='demo3' data-form-file='basestr' data-upload-type='scsfz' type="file" />
			            <input type="hidden" name="scsfz" id="scsfz" value="" />
			            <ul class="LUploader-list"></ul>
			        </div>
			        <div>
			            <div class="icon icon-camera font20"></div>
			            <p>上传本人手持身份证</p>
			        </div>
			    </div>
			    <div class="LUploader" id="demo4" style="border-bottom:1px solid #e4e3e6;">
			        <div class="LUploader-container">
			            <input data-LUploader='demo4' data-form-file='basestr' data-upload-type='ysz' type="file" />
			            <input type="hidden" name="ysz" id="ysz" value="" />
			            <ul class="LUploader-list"></ul>
			        </div>
			        <div>
			            <div class="icon icon-camera font20"></div>
			            <p>上传艺术照</p>
			        </div>
			    </div>
			    <div class="LUploader" id="demo5" style="border-bottom:1px solid #e4e3e6;width:100%;">
			        <div class="LUploader-container">
			            <input data-LUploader='demo5' data-form-file='basestr' data-upload-type='zzpz' type="file" />
			            <input type="hidden" name="zzpz" id="zzpz" value="" />
			            <ul class="LUploader-list"></ul>
			        </div>
			        <div>
			            <div class="icon icon-camera font20"></div>
			            <p>上传转账凭证</p>
			        </div>
			    </div>
			    <div style="width:100%;height:3rem;float:left"></div>
			</div>
			<input type="hidden" name="openid" id="openid" value="<?php echo htmlentities($openid); ?>"/> 
			<!--  
			<div class="mui-input-row mui-checkbox mui-left" id="mui-checkbox" style="margin-bottom:4rem;text-align:center;">
				<label><a href="">我已了解《注册服务协议》</a></label>
				<input name="checkbox" value="Item 1" type="checkbox" style="left:6.5rem;">
			</div> 
			-->
		</form>
	</div>
    <?php endif; ?>
    <div id="jingle_popup_mask" style="opacity: 0.1; display: none;"></div> 
    
    <div style="display:none"> 
	   	<script>
	          setTimeout(function () { 
	              document.getElementsByTagName('body')[0].style.webkitTextSizeAdjust = "100%";  
	           }, 2000);  
	    </script> 
    </div>  
</body> 
<script type="text/javascript">
$(function(){
	//邀请新代理
	$("#yqxdl").click(function(){
		$("#alertify").show();
	});
	//关闭代理选择窗口
	$("#alertify-cancel").click(function(){
		$("#alertify").hide();
	});
	
	//同意
	$("#tongyi").click(function(){
		mui.alert('欢迎成为互营宝代理，如有任何疑问，可以通过以下方式与公司取得联系：客服专线：027-57630076，投诉专线：027-57630076', ' ', function() {
			var dl_id = $("#dl_id").val();
			var pid = $("#pid").val();
			var start_time = $("#start_time").val();
			window.top.location.href = "/index.php/index/user/agentreg.html?dl_id="+dl_id+"&pid="+pid+"&start_time="+start_time;
		});
	}); 
	
	$("#province").change(function(){
		var province = $(this).val();
		if(province == 0){
			return false;
		}
		$.post("<?php echo url('user/getCity'); ?>",{province:province},function(data){
			var html = '';
			for(var i=0 in data){
				if(i == 0){
					$.post("<?php echo url('user/getArea'); ?>",{city:data[i]['code']},function(data){
						var html = '';
						for(var i=0 in data){
							html += "<option value='"+data[i]['code']+"'>"+data[i]['name']+"</option>";
						}
						$("#area").html(html);
					});
				}
				html += "<option value='"+data[i]['code']+"'>"+data[i]['name']+"</option>";
			}
			$("#city").html(html);
		});
	});
	
	$("#city").change(function(){
		var city = $(this).val();
		if(city == 0){
			return false;
		}
		$.post("<?php echo url('user/getArea'); ?>",{city:city},function(data){
			var html = '';
			for(var i=0 in data){
				html += "<option value='"+data[i]['code']+"'>"+data[i]['name']+"</option>";
			}
			$("#area").html(html);
		});
	});
	
	//立即注册
	$("#ljzc").click(function(){
		var that = $(this);
		var _form = $("#reg_form");
		$.ajax({
            type: "POST",
            url: _form.attr('action'),
            data: _form.serialize(),
            success: function(res) {
            	if(res.code == 0){
            		mui.alert(res.msg);
            		return false;
            	}else{
            		mui.alert(res.msg, ' ', function() { 
            			window.top.location.href = "/index.php/index/";
            		});
            	}
                //console.log(res);
            }
        });
	});
});
var a = <?php echo htmlentities($djsss); ?>;
var tt;
function px(){
    document.getElementById("p1").innerHTML=a;
    if(a>0){
        a--;
    }else{
        document.getElementById("p1").innerHTML='0';
        px1();
    }
    tt = setTimeout("px()",1000);   
}
function px1(){
    clearTimeout(tt);
} 
px();

mui.init();

 
[].slice.call(document.querySelectorAll('input[data-LUploader]')).forEach(function(el) {
    new LUploader(el, {
        url: "<?php echo url('user/uploadImg'); ?>",//post请求地址
        multiple: false,//是否一次上传多个文件 默认false
        maxsize: 102400,//忽略压缩操作的文件体积上限 默认100kb
        accept: 'image/*',//可上传的图片类型
        quality: 0.3,//压缩比 默认0.1  范围0.1-1.0 越小压缩率越大
        showsize:false//是否显示原始文件大小 默认false
    });
});
</script> 
<script type="text/javascript">
    $(function(){
		$(".mui-icon-back").click(function(){
			history.go(-1);
		});
	})
    </script> 
</html>